#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/in.h>
//#include <netinet/in.h>
#include "amber.h"
int main()
{
	int fd;
	struct sockaddr_in dest;

	char buffer[128];

	fd = socket(PF_INET, SOCK_STREAM, 0);

	bzero(&dest, sizeof(dest));
	//memset(&dest, 0, sizeof(dest));

	dest.sin_family = PF_INET;
	dest.sin_port = htons (9090);
	inet_aton("127.0.0.1", &dest.sin_addr);

	connect(fd, (struct sockaddr*)&dest, sizeof(dest));

	bzero(buffer, 128);
	
	recv(fd, buffer, sizeof(buffer), 0);
	
	printf("%s", buffer);

	close(fd);

	return 0;

}
